﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RoleLista.aspx.cs" Inherits="welwitschia.Administracao.RoleLista" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 <div id="header" class="info">
            <h2>
                Grupos de Utilizadores</h2>
            <div>
            </div>
        </div>
    <p>
    <asp:ListView runat="server" ID="lvGrupoUtilizadores"   
            onitemdeleting="lvGrupoUtilizadores_ItemDeleting" 
            onitemediting="lvGrupoUtilizadores_ItemEditing" 
            onitemcommand="lvGrupoUtilizadores_ItemCommand">
        <LayoutTemplate>
            <table runat="server" class="grd2" id="table1">
                <thead>
                     <tr class="ghdr2">
                     <td>
                       <asp:Label ID="lblNomeUtilizador" runat="server">Grupo</asp:Label>
                     </td>
                     <td>
                        &nbsp;
                     </td>
                     </tr>
                </thead>
                <tr runat="server" id="itemPlaceholder">
                </tr>
            </table>
            <asp:DataPager runat="server" ID="DataPager" PageSize="20">
              <Fields>
                <asp:NumericPagerField
                  ButtonCount="5"
                  PreviousPageText="<--"
                  NextPageText="-->" />
              </Fields>
            </asp:DataPager>
        </LayoutTemplate>
        <ItemTemplate>
           <tr id="Tr1" class='grd<%#Container.DataItemIndex % 2 %>' >
                <td id="Td1" runat="server">
                    <%-- Data-bound content. --%>
                    <asp:Label ID="lblUserName" runat="server" Text='<%#Container.DataItem  %>' />
                </td>
                <td id="Td3" runat="server">
                    <%-- Data-bound content. --%>
                    <asp:LinkButton ID="EditButton" CommandName="Edit"
                                    CommandArgument='<%#Container.DataItem %>' runat="server" Text="Editar"></asp:LinkButton>
                    <asp:LinkButton ID="DeleteButton"  
                                    OnClientClick="return confirm('Apaga registo?');" 
                                    CommandName="Delete" CommandArgument='<%#Container.DataItem %>' 
                                    runat="server" Text="Apagar"></asp:LinkButton>
                </td>
            </tr>
        </ItemTemplate>
    </asp:ListView>
    </p>
    <p><asp:Button ID="Button1" runat="server" Text="Criar Grupo" onclick="Unnamed1_Click" /></p>
</asp:Content>
